HybridMail Technical - Question-Answer
Updated: 24-09-2024 15:56

Question and Answer processor

The QuestionAndAnswer processor provides a framework for asking the recipient a question, either by email, SMS or a combination of both, and then processing and recording the response.

Asking the Question

To asks the question, an XML script must be created that creates an instance of the EmailSendQuestionProcessor attachment.

XML Attachment Schema

<mkzAttachment type="external" key="sendQuestion">
	<onSubmit>
		<if electronicDelivery="true" identifier="delivery" contains="smtp" >

			<setIdentifier name="msginfo" scan="4,0,80,40"/>
			<setIdentifier name="fullname" letterValue="recipient" />
			
			<checkAnswered qCode="agreeToTerms" />  <!-- sets lastResult to any previous answer -->
			<if identifier="lastResult" isEmpty="false" >
				<rejectLetter></rejectLetter>
			</if>
			
			<if identifier="lastResult" isEmpty="true" >
			
				<emailTo identifier="msginfo" extract="email:"/>
				<msgDelivery identifier="delivery" >smtp</msgDelivery>					
				<emailBodyFolder>C:\SomeFolder\</emailBodyFolder>
				<emailBodyFile>emailbodyQuestion.html</emailBodyFile>
				<emailSubject>Please make your choice</emailSubject>
				
				<sendQuestion key="questionAnswer" />
			</if>
		</if>
	</onSubmit>
</mkzAttachment>

This is an external attachment and so requires an entry in mkzCommon.config. Not that the MkzEmailSendQuestionProcessor is implemented inside the MoorfieldsRecipientValidation DLL file.

<add key="sendQuestion" value="MoorfieldsRecipientValidation.dll!Minkz.MkzEmailSendQuestionProcessor"/>	

The email file specified in the XML